//
//  JXSecurityManager.h
//  JXIntercomSDK
//
//  Created by Nansen on 2020/4/21.
//  Copyright © 2020 jingxi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "JXIntercomConstants.h"

@class IntercomManager;
@class SecurityDevice;
@class SecurityMessage;
@class JXSecurityAlarmModel;


NS_ASSUME_NONNULL_BEGIN

@protocol JXSecurityDelegate <NSObject>

@optional
/// 家庭的安防状态. [第一次获取到状态或者状态变更之后执行]
- (void)didSecurityStatusChangedInHome:(NSString *)homeId
                                status:(JX_SecurityStatus)status;

/// 收到安防警报
- (void)didReceivedAlarm:(JXSecurityAlarmModel *)alarm;

/// homeId 的警报已被关闭
- (void)didCancelAlarmInHome:(NSString *)homeId;

@end



@interface JXSecurityManager : NSObject

/// 设置安防监听
- (void)addSecurityDelegate:(id<JXSecurityDelegate>)holder;

/// 移除安防监听
- (void)removeSecurityDelegate:(id<JXSecurityDelegate>)holder;

/// 是否支持安防
/// @param homeId homeId
- (BOOL)isSupportSecurity:(NSString *)homeId;

/// 查询安防状态:
- (JX_SecurityStatus)querySecurityStatus:(NSString *)homeId;

/// 切换安防状态
- (void)switchSecurityStatus:(NSString *)homeId;

/// 关闭指定家庭的安防警报
- (void)cancelSecurityAlarmInHome:(NSString *)homeId;

@end

NS_ASSUME_NONNULL_END
